<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div class="layui-fluid">
    <div class="layui-btn-container AllBtnController">
        <@shiro.hasPermission name="repair:find">
            <a class="layui-btn" style="margin-left: 75%; width: 10%;" data-type="findRepairInfo">查&nbsp;&nbsp;&nbsp;&nbsp;询</a>
        </@shiro.hasPermission>
       <@shiro.hasPermission name="repair:delete">
            <a class="layui-btn layui-btn-danger" style="width: 10%;" data-type="deletebatchInfo">批量删除</a>
       </@shiro.hasPermission>
    </div>
</div>

<div class="layui-fluid">
    <table class="layui-hide" id="repairInfoTable" lay-filter="repairInfoTable"></table>
</div>

<div class="layui-fluid" id="updateRepairInfo" hidden>
    <fieldset class="layui-elem-field layui-field-title">
        <legend id="fieldTitle">更新</legend>
    </fieldset>
    <form class="layui-form" action="" style="margin-top: 2%">
        <div class="layui-form-item">
            <label class="layui-form-label">报修人</label>
            <div class="layui-input-block">
                <input type="text" name="userId" id="userId" required  lay-verify="required" placeholder="请输入内容" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">联系电话</label>
            <div class="layui-input-block">
                <input type="text" name="phone" id="phone" required  lay-verify="required" placeholder="请输入内容" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">地址</label>
            <div class="layui-input-block">
                <input type="text" name="address" id="address" required  lay-verify="required" placeholder="请输入内容" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">标题</label>
            <div class="layui-input-block">
                <input type="text" name="title" id="title" required  lay-verify="required" placeholder="请输入内容" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">原因</label>
            <div class="layui-input-block">
                <textarea name="reason" id="reason" placeholder="请输入..." class="layui-textarea"></textarea>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">状态</label>
            <div class="layui-input-block">
                <select id="status" name="status" lay-verify="required">
                     <#list repairStatus as status>
                         <option value="${status.type}">${status.name}</option>
                     </#list>
                </select>
            </div>
        </div>
        <@shiro.hasPermission name="repair:update">
            <div class="layui-form-item updateProperty">
                <div class="layui-input-block">
                    <a  class="layui-btn" id="updateInfo"  data-type="updateInfo">确认更新</a>
                </div>
            </div>
        </@shiro.hasPermission>
    </form>
</div>

<div class="layui-fluid" id="findRepairInfo" hidden>
    <fieldset class="layui-elem-field layui-field-title">
        <legend id="fieldTitle">查询</legend>
    </fieldset>
    <form class="layui-form" action="" style="margin-top: 2%">
        <div class="layui-form-item">
            <label class="layui-form-label">报修人</label>
            <div class="layui-input-block">
                <input type="text" name="fuserId" id="fuserId" required  lay-verify="required" placeholder="请输入内容" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">联系电话</label>
            <div class="layui-input-block">
                <input type="text" name="fphone" id="fphone" required  lay-verify="required" placeholder="请输入内容" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">地址</label>
            <div class="layui-input-block">
                <input type="text" name="faddress" id="faddress" required  lay-verify="required" placeholder="请输入内容" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">标题</label>
            <div class="layui-input-block">
                <input type="text" name="ftitle" id="ftitle" required  lay-verify="required" placeholder="请输入内容" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">原因</label>
            <div class="layui-input-block">
                <textarea name="freason" id="freason" placeholder="请输入..." class="layui-textarea"></textarea>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">状态</label>
            <div class="layui-input-block">
                <select id="fstatus" name="fstatus" lay-verify="required">
                     <#list repairStatus as status>
                         <option value="${status.type}">${status.name}</option>
                     </#list>
                </select>
            </div>
        </div>

        <div class="layui-form-item findProperty">
            <div class="layui-input-block">
                <a  class="layui-btn" id="findInfo"  data-type="findInfo">确认查询</a>
            </div>
        </div>
    </form>
</div>

<script type="text/html" id="oreationBtn">
    <@shiro.hasPermission name="repair:update">
        <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="update">更新</a>
    </@shiro.hasPermission>
    <@shiro.hasPermission name="repair:delete">
        <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
    </@shiro.hasPermission>
</script>
</body>
</html>